#!/bin/sh

pathname=$1

if [ x"$pathname" = "x" -o ! -f "$pathname" ]; then
    echo "Usage: $(basename $0) <pathname>"
    echo "    -- Copy host '<pathname>' to guest /share/ directory"
    exit 1
fi

. $(dirname $0)/system.conf


filename=$(basename $pathname)

echo "#1# check the $filename in current directory"
ls -l $pathname

echo "#2# start copy..."
$ssh_run_base mkdir -p /share
$ssh_scp_base $pathname $ssh_guest_address:/share/$filename

echo "#3# check the $filename in guest /share/"
$ssh_run_base ls -l /share/$filename
